package com.carl.zeus.model.vo;

import com.alibaba.fastjson.annotation.JSONField;
import com.carl.zeus.model.system.SysUser;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.io.Serializable;
import java.util.Date;

/**
 * Session  + User Bo
 * @author zcm
 *
 */
@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class UserOnlineBo extends SysUser {

	private static final long serialVersionUID = 1L;
	
	//Session Id
	private String sessionId;
	//Session Host
	private String host;

	//Session创建时间
	@JSONField(format="yyyy-MM-dd HH:mm:ss")
	private Date startTime;

	//Session最后交互时间
	@JSONField(format="yyyy-MM-dd HH:mm:ss")
	private Date lastAccess;

	//Session timeout
	private long timeout;

	//session 是否踢出
	private boolean sessionStatus = Boolean.TRUE;
	
	public UserOnlineBo(SysUser user) {
		super(user);
	}
	
}
